package com.blank.shop.sleuth.zipkin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * <br/>Date 2021/8/27
 * <br/>Time 17:09:56
 *
 * @author _blank
 */
@RestController
@SpringBootApplication
public class ShopSleuthZipkinAaApplication {

    public static final String SERVER_PROFILE_AA = "aa";
    public static final String SERVER_PROFILE_AB = "bb";
    public static final String SERVER_PROFILE_AC = "cc";

    public static final String SERVICE_AB_URL = "http://127.0.0.1:17288/say-hello";
    public static final String SERVICE_AC_URL = "http://127.0.0.1:17289/say-hello";

    public static void main(String[] args) {
        SpringApplication.run(ShopSleuthZipkinAaApplication.class, args);
    }

    @Configuration
    static class RestTemplateConfig {
        @Bean
        public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
            return restTemplateBuilder.build();
        }
    }

}
